home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / midas060 / src / postproc.wdi < prev    next >
Encoding:
Text File  |  1997-01-16  |  7.7 KB  |  223 lines

  1.                 .file   "postproc"
  2. .text
  3.                 .align 16
  4.                 .globl  _pp16Mono 
  5.                 .globl  _pp8Mono 
  6.                 .globl  _pp16Stereo 
  7.                 .globl  _pp8Stereo 
  8. _pp16Mono:      enter   $0x00,$0x0000
  9.                 pushl   %esi
  10.                 pushl   %edi
  11.                 pushl   %ebx
  12.                 movl    +0xc(%ebp),%edi
  13.                 addl    +0x10(%ebp),%edi
  14.                 movl    +0x14(%ebp),%esi
  15.                 movl    L24,%ebx
  16.                 movl    +0x8(%ebp),%ecx
  17.                 testl   %ecx,%ecx
  18.                 je      L4
  19. L1:             movl    (%esi),%eax
  20.                 addl    $0x00000004,%esi
  21.                 cmpl    $0x00007fff,%eax
  22.                 jg      L2
  23.                 cmpl    $0xffff8000,%eax
  24.                 jl      L3
  25.                 movw    %ax,(%edi)
  26.                 addl    $0x00000002,%edi
  27.                 decl    %ecx
  28.                 jne     L1
  29.                 jmp     L4
  30. L2:             movw    $0x7fff,(%edi)
  31.                 movl    $0x00007fff,%ebx
  32.                 addl    $0x00000002,%edi
  33.                 decl    %ecx
  34.                 jne     L1
  35.                 jmp     L4
  36. L3:             movw    $0x8000,(%edi)
  37.                 movl    $0xffff8000,%ebx
  38.                 addl    $0x00000002,%edi
  39.                 decl    %ecx
  40.                 jne     L1
  41. L4:             movl    %ebx,L24
  42.                 subl    +0xc(%ebp),%edi
  43.                 movl    %edi,%eax
  44.                 popl    %ebx
  45.                 popl    %edi
  46.                 popl    %esi
  47.                 leave   
  48.                 ret     
  49. L5:             .long   L6
  50.                 .long   L7
  51.                 .long   L8
  52.                 .long   L9
  53.                 .long   L10
  54.                 .long   L11
  55.                 .long   L12
  56.                 .long   L13
  57.                 .long   L14
  58.                 .long   L15
  59.                 .long   L16
  60.                 .long   L17
  61.                 .long   L18
  62.                 .long   L19
  63.                 .long   L20
  64.                 .long   L21
  65.                 .long   L22
  66. _pp8Mono:       enter   $0x00,$0x0000
  67.                 pushl   %esi
  68.                 pushl   %edi
  69.                 pushl   %ebx
  70.                 movl    +0x14(%ebp),%esi
  71.                 movl    +0xc(%ebp),%edi
  72.                 addl    +0x10(%ebp),%edi
  73.                 movl    +0x8(%ebp),%ecx
  74.                 testl   %ecx,%ecx
  75.                 je      L23
  76.                 shrl    $1,%ecx
  77.                 movl    %ecx,%eax
  78.                 andl    $0x0000000f,%eax
  79.                 shll    $1,%eax
  80.                 negl    %eax
  81.                 addl    $0x00000020,%eax
  82.                 subl    %eax,%edi
  83.                 shll    $1,%eax
  84.                 movl    L5(%eax),%ebx
  85.                 shll    $1,%eax
  86.                 subl    %eax,%esi
  87.                 shrl    $0x04,%ecx
  88.                 incl    %ecx
  89.                 movl    +0x18(%ebp),%edx
  90.                 jmp     %ebx
  91. L6:             movl    (%esi),%ebx
  92.                 movb    +0x800(%edx,%ebx),%al
  93.                 movl    +0x4(%esi),%ebx
  94.                 movb    +0x800(%edx,%ebx),%ah
  95.                 movw    %ax,(%edi)
  96. L7:             movl    +0x8(%esi),%ebx
  97.                 movb    +0x800(%edx,%ebx),%al
  98.                 movl    +0xc(%esi),%ebx
  99.                 movb    +0x800(%edx,%ebx),%ah
  100.                 movw    %ax,+0x2(%edi)
  101. L8:             movl    +0x10(%esi),%ebx
  102.                 movb    +0x800(%edx,%ebx),%al
  103.                 movl    +0x14(%esi),%ebx
  104.                 movb    +0x800(%edx,%ebx),%ah
  105.                 movw    %ax,+0x4(%edi)
  106. L9:             movl    +0x18(%esi),%ebx
  107.                 movb    +0x800(%edx,%ebx),%al
  108.                 movl    +0x1c(%esi),%ebx
  109.                 movb    +0x800(%edx,%ebx),%ah
  110.                 movw    %ax,+0x6(%edi)
  111. L10:            movl    +0x20(%esi),%ebx
  112.                 movb    +0x800(%edx,%ebx),%al
  113.                 movl    +0x24(%esi),%ebx
  114.                 movb    +0x800(%edx,%ebx),%ah
  115.                 movw    %ax,+0x8(%edi)
  116. L11:            movl    +0x28(%esi),%ebx
  117.                 movb    +0x800(%edx,%ebx),%al
  118.                 movl    +0x2c(%esi),%ebx
  119.                 movb    +0x800(%edx,%ebx),%ah
  120.                 movw    %ax,+0xa(%edi)
  121. L12:            movl    +0x30(%esi),%ebx
  122.                 movb    +0x800(%edx,%ebx),%al
  123.                 movl    +0x34(%esi),%ebx
  124.                 movb    +0x800(%edx,%ebx),%ah
  125.                 movw    %ax,+0xc(%edi)
  126. L13:            movl    +0x38(%esi),%ebx
  127.                 movb    +0x800(%edx,%ebx),%al
  128.                 movl    +0x3c(%esi),%ebx
  129.                 movb    +0x800(%edx,%ebx),%ah
  130.                 movw    %ax,+0xe(%edi)
  131. L14:            movl    +0x40(%esi),%ebx
  132.                 movb    +0x800(%edx,%ebx),%al
  133.                 movl    +0x44(%esi),%ebx
  134.                 movb    +0x800(%edx,%ebx),%ah
  135.                 movw    %ax,+0x10(%edi)
  136. L15:            movl    +0x48(%esi),%ebx
  137.                 movb    +0x800(%edx,%ebx),%al
  138.                 movl    +0x4c(%esi),%ebx
  139.                 movb    +0x800(%edx,%ebx),%ah
  140.                 movw    %ax,+0x12(%edi)
  141. L16:            movl    +0x50(%esi),%ebx
  142.                 movb    +0x800(%edx,%ebx),%al
  143.                 movl    +0x54(%esi),%ebx
  144.                 movb    +0x800(%edx,%ebx),%ah
  145.                 movw    %ax,+0x14(%edi)
  146. L17:            movl    +0x58(%esi),%ebx
  147.                 movb    +0x800(%edx,%ebx),%al
  148.                 movl    +0x5c(%esi),%ebx
  149.                 movb    +0x800(%edx,%ebx),%ah
  150.                 movw    %ax,+0x16(%edi)
  151. L18:            movl    +0x60(%esi),%ebx
  152.                 movb    +0x800(%edx,%ebx),%al
  153.                 movl    +0x64(%esi),%ebx
  154.                 movb    +0x800(%edx,%ebx),%ah
  155.                 movw    %ax,+0x18(%edi)
  156. L19:            movl    +0x68(%esi),%ebx
  157.                 movb    +0x800(%edx,%ebx),%al
  158.                 movl    +0x6c(%esi),%ebx
  159.                 movb    +0x800(%edx,%ebx),%ah
  160.                 movw    %ax,+0x1a(%edi)
  161. L20:            movl    +0x70(%esi),%ebx
  162.                 movb    +0x800(%edx,%ebx),%al
  163.                 movl    +0x74(%esi),%ebx
  164.                 movb    +0x800(%edx,%ebx),%ah
  165.                 movw    %ax,+0x1c(%edi)
  166. L21:            movl    +0x78(%esi),%ebx
  167.                 movb    +0x800(%edx,%ebx),%al
  168.                 movl    +0x7c(%esi),%ebx
  169.                 movb    +0x800(%edx,%ebx),%ah
  170.                 movw    %ax,+0x1e(%edi)
  171. L22:            addl    $0x00000080,%esi
  172.                 addl    $0x00000020,%edi
  173.                 decl    %ecx
  174.                 jne     L6
  175. L23:            subl    +0xc(%ebp),%edi
  176.                 movl    %edi,%eax
  177.                 popl    %ebx
  178.                 popl    %edi
  179.                 popl    %esi
  180.                 leave   
  181.                 ret     
  182. _pp16Stereo:    enter   $0x00,$0x0000
  183.                 pushl   %esi
  184.                 pushl   %edi
  185.                 pushl   %ebx
  186.                 movl    +0x8(%ebp),%eax
  187.                 shll    $1,%eax
  188.                 pushl   +0x18(%ebp)
  189.                 pushl   +0x14(%ebp)
  190.                 pushl   +0x10(%ebp)
  191.                 pushl   +0xc(%ebp)
  192.                 pushl   %eax
  193.                 call    _pp16Mono
  194.                 addl    $0x00000014,%esp
  195.                 popl    %ebx
  196.                 popl    %edi
  197.                 popl    %esi
  198.                 leave   
  199.                 ret     
  200. _pp8Stereo:     enter   $0x00,$0x0000
  201.                 pushl   %esi
  202.                 pushl   %edi
  203.                 pushl   %ebx
  204.                 movl    +0x8(%ebp),%eax
  205.                 shll    $1,%eax
  206.                 pushl   +0x18(%ebp)
  207.                 pushl   +0x14(%ebp)
  208.                 pushl   +0x10(%ebp)
  209.                 pushl   +0xc(%ebp)
  210.                 pushl   %eax
  211.                 call    _pp8Mono
  212.                 addl    $0x00000014,%esp
  213.                 popl    %ebx
  214.                 popl    %edi
  215.                 popl    %esi
  216.                 leave   
  217.                 ret     
  218.  
  219. .data
  220.                 .align 16
  221. L24:            .byte   0x00,0x00,0x00,0x00
  222.  
  223.